import java.util.Scanner;

/**
 * Created With IntelliJ IDEA
 * Description:牛客网: 首页 > 试题广场 > 剪花布条
 * <a href="https://www.nowcoder.com/questionTerminal/1046cd038f7a4b04b2b77b415973de1c">...</a>
 * User: DELL
 * Data: 2023-04-27
 * Time: 0:14
 */

public class Main {
    //这里是一个很暴力的字符串匹配的算法
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s1 = scanner.next();
            String s2 = scanner.next();
            int len1 = s1.length();
            int len2 = s2.length();
            //检测合法性
            if (len1 < len2) {
                System.out.println("0");
                continue;
            }
            int num = 0;
            for (int i = 0; i < len1-len2+1; i++) {
                if (s1.charAt(i) == s2.charAt(0)) {
                    int j = 1;
                    while (j < len2) {
                        if (s1.charAt(i+j) != s2.charAt(j)) {
                            break;
                        }
                        j++;
                    }
                    if (j == len2) {
                        i += j-1;
                        num++;
                    }
                }
            }
            System.out.println(num);
        }
    }
}
